<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<div id="app">
			<!-- v-for：只要时可迭代都可以使用v-for -->
			<ul>
				<li v-for="(value, key, index) in info" :key="index">{{key}} - {{value}} - {{index}}</li>
			</ul>

			<ul>
				<li v-for="(item, index) in message" :key="index">{{item}} - {{index}}</li>
			</ul>

			<ul>
				<li v-for="(item) in 10" :key="item">{{item}}</li>
			</ul>
		</div>

		<script src="./js/vue.js"></script>
		<script>
			// 1. 创建app实例
			const app = Vue.createApp({
				data() {
					return {
						message: 'hello vue',
						info: {
							name: '张三',
							age: 12,
						},
					}
				},
			})

			// 2. 挂载到#app上
			app.mount('#app')
		</script>
	</body>
</html>
